﻿using System;
using Ping.Core;

namespace Ping.Server.Jobs
{
	public sealed class StatusJob
		: Job
	{
		private readonly IServer _server;

		public override Type RequestType
		{
			get { return typeof (StatusRequest); }
		}

		public override Type ResultType
		{
			get { return typeof (StatusResult); }
		}

		public override string Name
		{
			get { return "Status"; }
		}

		public StatusJob(IServer server)
		{
			_server = server;
		}

		public override Result Perform(Request request)
		{
			return new StatusResult(_server);
		}
	}
}